using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class Dm_FileMap : EntityTypeConfiguration<Dm_File>
    {
        public Dm_FileMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            this.Property(t => t.FileName)
                .HasMaxLength(200);

            // Table & Column Mappings
            this.ToTable("Dm_File");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.FileName).HasColumnName("FileName");
            this.Property(t => t.Document).HasColumnName("Document");
        }
    }
}
